<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AVBD---{% block title %}  {% endblock %}</title>
    <script src="../static/js/jquery.js"></script>
    <script src="../static/js/jquery.dataTables.js"></script>
    <script src="../static/js/dataTables.bootstrap.js"></script>
    <!-- Bootstrap core CSS -->
    <link href="../static/css/bootstrap.css" rel="stylesheet">
    <link href="../static/css/dataTables.bootstrap.css">
    <link href="../static/css/hd.css">
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">

</head>
<body>

<div class="container">

        <div class="navbar-header">
          <a class="navbar-brand" href="{{ url_for('avbd_app.index') }}">AVBD</a>
        </div>

        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav ">
             {% if current_user.is_authenticated %}

            <li><a href="{{ url_for('avbd_app.index') }}">Actress</a></li>
            <li><a href="{{ url_for('avbd_app.movie',name='all') }}">Movie</a></li>
            <li><a href="{{ url_for('avbd_app.type_list') }}">Type</a></li>
            <li><a href="{{ url_for('avbd_app.about') }}">About</a></li>
            <li><a href="#contact">Contact</a></li>
            <li  ><a href="{{ url_for('avbd_app.lucky')}}">I'm Feeling lucky</a></li>
            {% if current_user.isAdmin %}
                 <li><a href="/admin">Admin</a></li>
                {% endif %}
            <li><a href="{{ url_for('avbd_auth.logout') }}">Logout</a></li>
             <form class="navbar-form navbar-right" method="POST" action="{{ url_for('avbd_app.search') }}">
                <input  name='data' type="text" class="form-control" placeholder="Search......">
            </form>

            {% else %}
            <li><a href="{{ url_for('avbd_auth.login') }}">Login</a></li>
            <li><a href="{{ url_for('avbd_auth.register') }}">Register</a></li>
          </ul>
            {% endif %}

            </div><!--/.nav-collapse -->
      </div>

<div class="container">
      <div class="page-header">
        <h1>{% block name %}{% endblock %}</h1>
      </div>
        {% block flash_messages %}
            {%- with messages = get_flashed_messages(with_categories=true) -%}
                {% if messages %}
                    {% for category, message in messages %}
                        {% if category=='error' %}
                            {% set category='danger' %}
                        {% elif category == 'success' %}
                            {% set category = 'success' %}
                        {% elif category == 'info' %}
                            {% set category = 'info' %}
                        {% endif %}
                        <div class="alert alert-{{category}}">{{ message|safe }}</div>
                    {% endfor %}
                {% endif %}
            {%- endwith %}
        {% endblock %}
        {% block table %}


        {% endblock %}
    </div>


{% block script %}

{% endblock %}
<div>

</div>
<br>

<hr>
<footer>
        <p class="text-center">© 2016 Young Boy Data Lab, Inc. · <a href="#">YBDL</a> · <a href="#">Terms</a></p>
      </footer>
</body>
</html>